# company = {'BOSS':'唐僧','CTO':'悟空','CFO':'八戒','搬砖':'沙僧','苦力':'白龙马'}
# print(company['CTO'])
# print(company['BOSS'])
# print("BOSS是{BOSS},CTO是{CTO},CFO是{CFO},搬砖是{搬砖},苦力是{苦力}".format(BOSS="唐僧",CTO="悟空",CFO="八戒",搬砖="沙僧",苦力="白龙马"))
# judge = input("请输入要判断的人:")
# if judge in company.values():
#     print("此人物在company中")
# else:
#     print("此人不在company中")
# judge1 = input("请输入要判断的人:")
# if judge1 in company.values():
#     print("此人在company中")
# else:
#     print("此人不在company中")



# print("欢迎使用用户检测系统")
# user_list = {'root':'123456','admin':'admin'}
# while True:
#     username = input("请输入用户名:")
#     if username == "quit":
#         print("退出查找!")
#         break
#     passwd = input("请输入密码:")
#     if passwd == "quit":
#         print("退出查找!")
#         break
#     if username in user_list:
#         if passwd in user_list.values():
#             print("验证成功!")
#         else:
#             print("验证失败!")
#         break


import random
staff = {
    "谢潇伊": 1,
    "朱嘉慧": 2,
    "伍佳希": 3,
    "曹嘉伟": 4,
    "王奥康": 5,
}

# 所有的礼物编号
gifts = [i for i in staff.values()]

def get_gift():
    '''随机抽取礼物'''
    # 设置一个随机值，范围是0-礼物数量减1
    n = random.randint(0, len(gifts)-1)
    if staff.get(x) == gifts[n]:
        # 判断等于自己的礼物
        get_gift()  # 重新抽取
    else:
        print("%s 取到了礼物编号 %s" % (x, gifts[n]))
        # 取到了礼物后，把礼物从礼品盒里面移除掉
        del gifts[n]

if __name__ == '__main__':
    for x in staff.keys():
        if x not in staff.keys():
            print("输入员工名称")
        else:
            get_gift()

